import {deleteRequest, getRequest, postRequest} from '../baseRequest'

// 查询modeler列表
export const listDefinition = (params) => getRequest('/process/definition/page', params)

// 查询流程部署版本
export const listVersionDefinition = (params) => getRequest('/process/definition/version/page', params)
// 获取流程定义XMl
export const getProcessDefineXML = (deployId) => getRequest('/process/definition/xml/'+deployId)

// 挂起激活转换
export const suspendOrActiveApply = (data) => postRequest('/process/definition/suspendOrActiveApply', data)


// export function addDeploymentByString(data) {
//   return request({
//     url: '/process/definition/addDeploymentByString',
//     method: 'post',
//     data: {...data}
//   })
// }
//
// export function getDefinitionXML(data) {
//   return request({
//     url: '/process/definition/getDefinitionXML',
//     method: 'get',
//     params: data
//   })
// }
//
// export function gethighLine(data) {
//   return request({
//     url: '/activitiHistory/gethighLine',
//     method: 'get',
//     params: data
//   })
// }

// 删除Modeler
export const delDefinition = (id) => deleteRequest('/process/definition/' + id)

